<div class="card border-info m-3">
    <h5 class="card-header bg-info text-white">修改</h5>
    <div class="card-body">
        <h5 class="card-title">基础信息</h5>
        <p class="card-text">请按内容提示，录入相关信息。</p>
        <div class="row mb-3">
            <div class="col-6">
                <ng-select
                        [items]="extend.domain.serZoneType.items"
                        [multiple]="false"
                        [closeOnSelect]="true"
                        [searchable]="true"
                        bindLabel="name" bindValue="id"
                        placeholder="{{extend.domain.serZoneType.nickname}}" tooltip="{{extend.domain.serZoneType.nickname}}"
                        [(ngModel)]="domain.fkZoneType"
                        (change)="extend.domain.serZoneType.change($event)">
                </ng-select>
            </div>
            <div class="col-6">
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">编号</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serNum">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConZoneManage.serNum'] !== null">{{errRes.error?.detail['ConZoneManage.serNum']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">备注</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serMemo">
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">名称（中文）</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serName">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConZoneManage.serNum'] !== null">{{errRes.error?.detail['ConZoneManage.serNum']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">名称（英文）</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serNameEn">
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <ng-container aria-label="ossUpload">
                    <div class="text-center mb-2"
                         *ngIf="domain.serNameBgImgUrl !== null && domain.serNameBgImgUrl !== undefined && domain.serNameBgImgUrl.length > 0">
                        <img [src]="domain.serNameBgImgUrl" style="height: 5rem; max-width: 10rem;">
                        <p><span class="badge badge-success">{{domain.serNameBgImgUrl}}</span></p>
                    </div>
                    <input #file class="displayNone" type="file" ng2FileSelect
                           [uploader]="extend.domain.file.oss.uploader"
                           (change)="extend.domain.file.change($event)"/>
                </ng-container>
                <div class="input-group" tooltip="名称（背景图片）">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">名称（背景图片）</button>
                    </div>
                    <div class="input-group-append w-75">
                        <button class="btn btn-default border-info w-100" type="button" (click)="file.click()">选择</button>
                    </div>
                </div>
            </div>
            <div class="col-6">
                <ng-container aria-label="ossUpload">
                    <div class="text-center mb-2"
                         *ngIf="domain.serImgUrl !== null && domain.serImgUrl !== undefined && domain.serImgUrl.length > 0">
                        <img [src]="domain.serImgUrl" style="height: 5rem; max-width: 10rem;">
                        <p><span class="badge badge-success">{{domain.serImgUrl}}</span></p>
                    </div>
                    <input #file2 class="displayNone" type="file" ng2FileSelect
                           [uploader]="extend.domain.file2.oss.uploader"
                           (change)="extend.domain.file2.change($event)"/>
                </ng-container>
                <div class="input-group" tooltip="名称（背景图片）">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">图片地址</button>
                    </div>
                    <div class="input-group-append w-75">
                        <button class="btn btn-default border-info w-100" type="button" (click)="file2.click()">选择</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">超链接</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serHyperlinks">
                </div>
            </div>
            <div class="col-6">
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <ng-select
                        [items]="extend.domain.serGoodsTypeFlag.items"
                        [multiple]="false"
                        [closeOnSelect]="true"
                        [searchable]="true"
                        bindLabel="name" bindValue="id"
                        placeholder="{{extend.domain.serGoodsTypeFlag.nickname}}" tooltip="{{extend.domain.serGoodsTypeFlag.nickname}}"
                        [(ngModel)]="domain.serGoodsTypeFlag"
                        (change)="extend.domain.serGoodsTypeFlag.change($event)">
                </ng-select>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConZoneManage.serGoodsTypeFlag'] !== null">{{errRes.error?.detail['ConZoneManage.serGoodsTypeFlag']}}</span>
            </div>
            <div class="col-6">
                <ng-select
                        [items]="extend.domain.linkedGoods.items"
                        [multiple]="false"
                        [closeOnSelect]="true"
                        [searchable]="true"
                        bindLabel="name" bindValue="id"
                        placeholder="{{extend.domain.linkedGoods.nickname}}" tooltip="{{extend.domain.linkedGoods.nickname}}"
                        [(ngModel)]="domain.fkGoods"
                        (change)="extend.domain.linkedGoods.change($event)">
                </ng-select>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConZoneManage.fkGoods'] !== null">{{errRes.error?.detail['ConZoneManage.fkGoods']}}</span>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">排序号</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serSortNumber">
                </div>
            </div>
            <div class="col-6">
            </div>
        </div>

        <div class="text-center mt-5">
            <button type="button" class="btn btn-outline-primary" (click)="func.update.req($event)">修改</button>
        </div>
    </div>
</div>

<span class="badge badge-info mr-3" *ngIf="errRes?.error?.timestamp !== null">response time: {{errRes?.error?.timestamp}}</span>

<div *ngIf="false">
    <p>{{errRes?.error}}</p>
    <p>{{errRes?.error?.code}}</p>
    <p>{{errRes?.error?.description}}</p>
    <p>{{errRes?.error?.timestamp}}</p>
    <p>{{errRes?.error?.detail?.RR?.duration}}</p>
    <p>{{errRes?.error?.detail['ConZoneManage.serNum']}}</p>
    <p>{{errRes?.error?.detail['ConZoneManage.serAudit']}}</p>
    <p>{{errRes?.error?.detail['ConZoneManage.serValid']}}</p>
    <p>{{errRes?.error?.detail['ConZoneManage.serValid2']}}</p>
    <p>{{errRes?.headers}}</p>
    <p>{{errRes?.message}}</p>
    <p>{{errRes?.name}}</p>
    <p>{{errRes?.ok}}</p>
    <p>{{errRes?.status}}</p>
    <p>{{errRes?.statusText}}</p>
    <p>{{errRes?.url}}</p>
</div>
